1. Field of the Invention
The present invention relates to a semiconductor device and a method of driving the semiconductor device. The present invention particularly relates to a method of driving the semiconductor device which detects a location where an object is touched in a touch panel including a self-light-emitting element.
It is to be noted that the semiconductor device in this specification refers to all devices that can function by utilizing semiconductor characteristics, and electro-optic devices, semiconductor circuits, and electronic devices are all semiconductor devices.
2. Description of the Related Art
In recent years, a display device provided with a touch sensor has attracted attention. The display device provided with a touch sensor is called a touch panel, a touch screen, or the like (hereinafter also referred to simply as a touch panel). Examples of the touch sensor include a resistive touch sensor, a capacitive touch sensor, and an optical touch sensor. Patent Document 1 discloses a display device provided with an optical touch sensor.
The accuracy of detecting the location of a touch is given as one of the indicators of performance of a touch panel. It can be said that the detection accuracy becomes higher as a difference becomes smaller between the location of an actual touch of an object on a display screen of a touch panel and a location detected by a sensing portion provided in a touch panel.
In a display device including an optical touch sensor, the optical sensor determines the existence of external light, thereby detecting the location of a touch. That is, with the touch of an object on the display screen, external light to be incident on the touch panel is blocked, so that a shadow of the object is formed on the touch panel. The gray scale image of the shadow is taken by the sensing portion. Thus, the location of the touch is detected from the gray scale of the shadow. Note that the gray scale of the shadow depends on external light detected by the sensing portion. In Patent Document 2, in order to increase detection accuracy, control is conducted so that only external light is detected by a sensing portion in an image-capture period. That is, a backlight is turned off in the image-capture period in the case of using a liquid crystal element as a display element, and no light is emitted (black is displayed) in the image-capture period in the case of using a self-light-emitting element.